<?php
    /**
     * Invoice.php
     *
     * Created by PhpStorm.
     * author: liuml  <liumenglei0211@163.com>
     * DateTime: 2018/8/2  9:03
     */

    namespace app\wap\controller;

    use data\service\Config;
    use data\service\Goods;
    use data\service\GoodsCategory;
    use data\service\Member as MemberService;
    use data\service\Platform;
    use data\service\promotion\PromoteRewardRule;
    use data\service\WebSite;
    use think\Cookie;
    use data\service\Promotion;
    use data\service\Shop;
    use think\Cache;
    use data\service\Tzinvoice;

    class Invoice extends BaseController
    {
        public function invoiceHandle()
        {
            if($this->request->isAjax()){
                $invoice = new Tzinvoice();
                $res = $invoice->saveInvoice($this->request->post());
                if($res){
                    return AjaxReturn(1);
                }
                return AjaxReturn(0);
            }
            $ticket = $this->getShareTicket();
            $this->assign("signPackage", $ticket);
            return view($this->style.'Invoice/invoiceHandle');
        }

        public function invoiceList(){
            $invoice = new Tzinvoice();
            $list = $invoice->getInvoice();
            $this->assign('list', $list);
            return view($this->style.'Invoice/invoiceList');
        }
    }